<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Meil88 Weby.cc">
    <link rel="shortcut icon" href="/img/favicon.png">

    <title>自动授权-Hostfans - PHP授权系统</title>

    <!-- Bootstrap core CSS -->
    <link href="/static/css/bootstrap.min.css" rel="stylesheet">
    <link href="/static/css/bootstrap-reset.css" rel="stylesheet">
    <!--external css-->
    <link href="/static/font-awesome/css/font-awesome.css"  rel="stylesheet"/>
    <!-- Custom styles for this template -->
    <link href="/static/css/style.css"  rel="stylesheet">
    <link href="/static/css/style-responsive.css" rel="stylesheet"/>
    <!--toastr-->
    <link href="/static/toastr-master/toastr.css" rel="stylesheet" type="text/css"/>
    <script language="JavaScript" src="/static/js/jquery-1.7.2.min.js"></script>
    <script language="javascript" type="text/javascript" src="/static/layer/layer.js"></script>
   	<!-- <script language="JavaScript" src="/static/js/function.js"></script> -->
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
    <!--[if lt IE 9]>
    <script src="/static/js/html5shiv.js" ></script>
    <script src="/static/js/respond.min.js" ></script>
    <![endif]-->
	<style>
	body{
		margin: 0 auto;
		text-align: center;
	}
	.container {
	  max-width: 580px;
	  padding: 15px;
	  margin: 0 auto;
	}
	.hzhz{
		float: left;
	}
	.bzbz {
	color: #31708f;
	background-color: rgba(217, 237, 247, 0.73);
	border-color: #bce8f1;

	padding: 15px;
	margin-bottom: 20px;
	border: 1px solid transparent;
	border-radius: 3px;
	}
	.form-controltm {
	display: block;
	width: 100%;
	height: 34px;
	padding: 6px 12px;
	font-size: 14px;
	line-height: 1.42857143;
	color: #555;
	background-color: rgba(255, 255, 255, 0.48);
	background-image: none;
	border: 1px solid #ccc;
	border-radius: 4px;
	-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
	-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
	-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
	transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
	}

	.alert-dangergg {
	color: #a94442;
	background-color: #f2dede;
	border-color: #ebccd1;

	padding: 15px;
	margin-bottom: 20px;
	border: 1px solid transparent;
	border-radius: 4px;
	}
	</style>
</head>
<body class="login-body">
<div class="container">
<form class="form-signin" name="loginform" method="post" action="" id='form'>
        <h2 class="form-signin-heading">域名授权系统登录</h2> 
            <div class="login-wrap">
                      <input class="form-control" name="username" type="text" placeholder="账号" />
                      <input class="form-control" name="password" type="password" placeholder="密码" />
                       <input class="form-control" name="safepwd" type="password" placeholder="安全码" />
            <div>
            <a class="btn btn-lg btn-login btn-block" id="login" onclick='let_login()'>登陆</a>
            </div>
            </div>           
</form>
</div>
<!-- js placed at the end of the document so the pages load faster -->
<script src="/static/js/jquery.js" ></script>
<script src="/static/js/bootstrap.min.js" ></script>
<!--toastr-->
<script src="/static/toastr-master/toastr.js" ></script>
<script type="text/javascript" src="/static/jCryption/jquery.jcryption.3.1.0.js" ></script>
</body>
</html>
<script type="text/javascript">
function let_login(){
    var username = $("input[name='username']").val();
    var pssword = $("input[name='password']").val();
    var safepwd = $("input[name='safepwd']").val();
    if(username==''){
        layer.msg('账号不能为空!',{icon: 2,time:1000});
        return false;
    }
    if(pssword==''){
        layer.msg('密码不能为空!',{icon: 2,time:1000});
        return false;
    }
    if(safepwd==''){
        layer.msg('安全码不能为空!',{icon: 2,time:1000});
        return false;
    }
    $.ajax({
        type: 'post',
        url: '{:url("admin/index/login")}',
        data: $('#form').serialize(),
        success: function(data){
            if(data.code==1){
                layer.msg(data.msg, 
                {icon:1,time:1000},function(){
                     window.location.href = data.url;});
            }else{
                layer.msg(data.msg, 
                {icon:2,time:1000});   
            }
        }
    });
}     
</script>

